1. Technical Field
The present disclosure relates to the technical field of graphic rendering and, particularly, to 3D (three-dimensional) rendering. More particularly, the present disclosure can be applied to the sort-middle technique.
2. Description of the Related Art
Computer graphics is the technique of generating pictures with a computer. Generation of pictures, or images, is commonly called rendering. Generally, in three-dimensional (3D) computer graphics, geometry that represents surfaces (or volumes) of objects in a scene is translated into pixels and then displayed on a display device.
In computer graphics each object to be rendered is composed of a number of primitives. A primitive is a simple geometric entity such as, e.g., a point, a line, a triangle, a square, a polygon or high-order surface.
A summary of the prior art rendering process can be found in:                “Fundamentals of Three-dimensional Computer Graphics”, by Watt, Chapter 5;        The Rendering Process, pages 97 to 113, published by Addison-Wesley Publishing Company, Reading, Mass., 1989, reprinted 1991, ISBN 0-201-15442-0; or in:        “Real Time Rendering”, by T. Moller, E. Haines, Chapter 2: The Graphics Rendering Pipeline, pages 7 to 23, published by A K Peters, 1999, ISBN 1-56881-101-2.        
Two main rendering techniques are known: the traditional technique (also called “immediate mode rendering”) and the sort-middle technique (also called tile-based rendering).
According to the first rendering technique, a graphic pipeline, known by those skilled in the art as an immediate mode renderer, processes a set of three-dimensional (3D) primitives by a client-server mechanism based on an application programming interface (API). Particularly, such primitives are processed in the submission order.
Main features related to the immediate mode rendering are described in the following documents:                A. Munshi, “OpenGL/ES Common/Common-Lite Profile Specification, Version 1.1 (Annotated); Editor (version 1.1);        M. Segal, K. Akely, J. Leach, “The OpenGL Graphics System: A Specification (Version 1.5)”, Mark and Kurt Akely Editor;        “Quake III Arena”, ID Software Inc. 199,ftp//ftp. idsoftware.com/idstuff/quake3/win32/q3ademo.exe.        T. A. Moller and H. Heines, “Real-Time Rendering”, A K Peters 2nd edition 2002.        
FIG. 1 shows a graphic pipeline 1 known as “sort-middle pipeline” according to the second rendering technique. Particularly, such sort-middle pipeline 1 comprises: a driver stage 2 (usually located in a central processing unit or CPU), a geometry stage (also known as a Transform and Lighting, TnL, motor) 3, a pre-processing module 4, a rasterizer 5 and a fragment processor 6. The pre-processing module 4 also known as tiler is suitable to exchange data with a scene buffer (SB) 7.
Such graphic pipeline 1 operates to process primitives in order to compose an external color buffer or frame buffer 8, a depth buffer 11 and a texture memory 12 of a displayed final scene. Particularly, in accordance with the sort-middle approach the scene is decomposed into tiles which are rendered one by one. This allows color components and z values of one tile to be stored in small, on-chip buffers: a first color buffer (CB) 9 and a first depth buffer (DB) 10, respectively. In this way, only the pixels visible in the final scene need to be stored in the external frame buffer 8.
Examples of the sort-middle rendering technique are described in:                S. Molnar, M. Cox, D. Ellsworth, H. Fuchs, “A sorting classification of parallel rendering”, IEE Computer Graphics July/August 1994 (Vol. 14, No. 4), pp. 23-32;        H. Fuchs et al. “Pixel-Planes 5:A Heterogeneous Multiprocessor Graphics System Using Processor-Enhanced Memories”, Computer Graphics, Volume 23, No. 3, July 1989.        